<?php if (!defined('THINK_PATH')) exit();?><!DOCTYPE html>
<html>

    <head>
        <meta charset="UTF-8">
        <title>职管用管理端平台</title>
        <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no" />
        <meta name="apple-mobile-web-app-capable" content="yes" />
        <meta name="description" content="">
        <meta name="keywords" content="coco bootstrap template, coco admin, bootstrap,admin template, bootstrap admin,">
        <meta name="author" content="Huban Creative">
        <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">

        <!-- Base Css Files -->
        <link href="<?php echo __BOOTSTRAP__;?>css/bootstrap.min.css" rel="stylesheet" />
        <link href="<?php echo __CSS__;?>font-awesome/css/font-awesome.min.css" rel="stylesheet" />
        <link href="<?php echo __CSS__;?>fontello/css/fontello.css" rel="stylesheet" />

        <!-- Extra CSS Libraries Start -->
        <link href="<?php echo __CSS__;?>style.css" rel="stylesheet" type="text/css" />
        <!-- Extra CSS Libraries End -->

        <!-- HTML5 Shim and Respond.js IE8 support of HTML5 elements and media queries -->
        <!-- WARNING: Respond.js doesn't work if you view the page via file:// -->
        <!--[if lt IE 9]>
<script src="https://oss.maxcdn.com/libs/html5shiv/3.7.0/html5shiv.js"></script>
<script src="https://oss.maxcdn.com/libs/respond.js/1.3.0/respond.min.js"></script>
<![endif]-->

        <link rel="shortcut icon" href="<?php echo __IMG__;?>Besiness/favicon.ico">
    </head>

    <body>
        <!-- Start content-->
        <div class="content">
            <div class="row">
                <div class="col-md-12">
                    <div class="widget">
                        <div class="widget-header transparent">
                            <h2><strong>会员管理</strong></h2>
                        </div>
                        <div class="data-table-toolbar table-size">
                            <a href="<?php echo U('Vip/vip_add');?>" class="promote-layer table-select btn btn-success">新增会员</a>
                        </div>
                        <form method="get" role="form" action="<?php echo U('Vip/vip');?>">
                            <div class="data-table-toolbar table-size">
                                <label class="table-select">用户名：</label>
                                <input type="text" class="form-control" placeholder="用户名" value="<?php echo ($username); ?>" name="username"/>
                                <label class="table-select">手机号：</label>
                                <input type="text" class="form-control" placeholder="手机号" value="<?php echo ($mobile); ?>" name="mobile"/>
                                <button type="submit" class="table-select btn btn-success">查询</button>
                            </div>
                            <div class="data-table-toolbar table-size">
                                <label class="table-select">性别：</label>
                                <select class="form-control" name="sex">
                                    <option value="0" <?php if($sex==0){echo 'selected="true"';} ?>>全部</option>
                                    <option value="1" <?php if($sex==1){echo 'selected="true"';} ?>>男</option>
                                    <option value="2"<?php if($sex==2){echo 'selected="true"';} ?>>女</option>                                   
                                </select>
                               <!-- <label class="table-select">是否认证：</label>
                                <select class="form-control" name="is_auth">
                                    <option value="0" <?php if($is_auth==0){echo 'selected="true"';} ?>>全部</option>
                                    <option value="2" <?php if($is_auth==2){echo 'selected="true"';} ?>>是</option>
                                    <option value="1"<?php if($is_auth==1){echo 'selected="true"';} ?>>否</option>   
                                </select>-->
                                <label class="table-select">是否禁用：</label>
                                <select class="form-control" name="status">
                                    <option value="-1" <?php $xo = I('status');if($status === -1){ echo 'selected = "true"';} ?>>全部</option>
                                    <option value="0" <?php if($status === 0){echo 'selected = "true"';} ?>>是</option>
                                    <option value="1" <?php if($status === 1){echo 'selected = "true"';} ?>>否</option>

                                </select>
                                <button type="button" class="table-select btn btn-success">导出</button>
                            </div>
                        </form>
                        <div class="table-responsive">
                            <table class="table table-hover table-striped">
                                <thead>
                                    <tr>
                                        <th>序号</th>
                                        <th>用户名</th>
                                        <th>学历</th>
                                        <th>手机号</th>
                                        <th>性别</th>
                                        <th>身份证号</th>
                                        <th>是否禁用</th>
                                        <th>操作</th>
                                    </tr>
                                </thead>
                                <tbody>
                                <?php if(is_array($list)): foreach($list as $key=>$list): ?><tr>
                                        <td><?php echo ($list["uid"]); ?></td>
                                        <td><?php echo ($list["username"]); ?></td>
                                        <td><?php echo ($list["edu"]); ?></td>
                                        <td><?php echo ($list["mobile"]); ?></td>
                                        <td>
                                    <?php if($list['sex'] == 1): ?>男
                                        <?php elseif($list['sex'] == 2): ?>
                                        女<?php endif; ?>
                                    </td>
                                    <td><?php echo ($list["identity"]); ?></td>
                                    <td class="vip-state">
                                    <?php if($list['status'] == 0): ?><span class="label label-danger">是</span>
                                        <?php elseif($list['status'] == 1): ?>
                                        <span class="label label-success">否</span><?php endif; ?>
                                    </td>
                                    <td>
                                        <div class="btn-group btn-group-xs">
                                            <a href="<?php echo U('Vip/vip_deta',array('uid'=>$list['uid']));?>"  tit="编辑" class="btn btn-default"><i class="fa fa-edit"></i></a>
                                            <a href="<?php echo U('Vip/vip_details',array('uid'=>$list['uid']));?>" tit="查看详情" class="btn btn-default"><i class="fa fa-search-plus"></i></a>
                                            <?php switch($list['status']){ case 1: $tit = '禁用'; $start = 'disable'; break; case 0: $tit = '启用'; $start = 'start'; break; default: $tit = '禁用'; $start = 'disable'; break; } ?>
                                            <a tit="<?php echo ($tit); ?>" data-start="<?php echo U('Vip/do_start');?>" data-disable="<?php echo U('Vip/do_disable');?>" class="btn btn-default" data-bind="<?php echo ($list["uid"]); ?>" data-url="<?php if($start == "start"): echo U('Vip/do_start'); else: echo U('Vip/do_disable'); endif; ?>">
                                                <?php if($list["status"] == 0): ?><i class="fa fa-check-circle-o"></i>
                                                    <?php else: ?>
                                                    <i class="fa fa-ban"></i><!-- 禁止图标--><?php endif; ?>
                                            </a>
                                           <!-- <a href="<?php echo U('Vip/score',array('uid'=>$list['uid']));?>" tit="积分" class="btn btn-default"><i class="glyphicon glyphicon-list-alt"></i></a>
                                            <a href="<?php echo U('Vip/nul_score',array('uid'=>$list['uid']));?>" tit="积分清零" class="btn btn-default"><i class="glyphicon glyphicon-wrench"></i></a>
                                            <a tit="启用" class="btn btn-default"><i class="fa fa-check-circle-o"></i></a>
                                            <a tit="禁用" class="btn btn-default"><i class="fa fa-ban"></i></a>-->
                                        </div>
                                    </td>
                                    </tr><?php endforeach; endif; ?>
                                </tbody>
                            </table>
                        </div>
                        <div class="my_page"><?php echo ($page); ?></div>
                    </div>
                </div>
            </div
            <!-- Footer Start -->
            <div class="footer">Copyright &copy; 2016 河南职管用信息技术有限公司</div>
            <!-- Footer End -->
        </div>

        <script type="text/javascript" src="<?php echo __LIBS__;?>jquery/jquery-1.11.1.min.js"></script>
        <script type="text/javascript" src="<?php echo __LIBS__;?>layer/layer.js"></script>
        <script type="text/javascript" src="<?php echo __JS__;?>common.js"></script>
    </body>

</html>